home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Cube 5: Home Applications
/
MacCube Volume 5: Home Applications.iso
/
Home
/
MacFolklore 1.0
/
Documentation
/
The Grade A testing engine
< prev
Wrap
Text File
|
1995-04-19
|
4KB
|
97 lines
ABOUT THE GRADE A TESTING ENGINE
--------------------------------
Note: This document, Grade A, and MacFolklore are all (c)1995, by Scott J.
Kleper. All Rights Reserved.
_Introduction_
Grade A is a program I started in 1992, back when I was taking Spanish as a
sophomore at Pittsford Sutherland High School. I wanted a program that would
test me on my vocabulary words randomly and give me a percentage at the end.
It was originally text-based and written in the Pascal programming language.
As time went by, I improved it, at one point even porting it to Windows for
a friend.
About a year ago, a local sysop wanted me to write some online games for his
BBS. I wanted to start with something easy and text-based, so I picked up the
Grade A code and modified it into a program called MacFreak. The game was
never put online, but was distributed to a few friends. Essentially, it was
the same text-based program, but the questions were all about Macintosh
history. It was also now written in C instead of Pascal. Also, instead of
allowing the user to type in the answer, it gave the user three choices to
select from.
Then, about two months ago, I was going through some old code. I stumbled on
MacFreak and decided to brush the dust off of it and see what I could do with
it. I ported it over to CodeWarrior and got a somewhat stable version running
in a few days. I put it up at a few sites for beta testers and to see if it'd
catch on. I got some good feedback about it and decided to go ahead and
pursue the project.
In order to get things working, I had to deviate significantly from the Grade
A code. The engine it used to test the user was pretty buggy and sluggish.
For example, to randomize the structure that holds the test, Grade A would
create a second structure, copy everything over to that one, then copy them
back in random order! Hardly efficient especially when it's randomizing up
to 500 entries to give a 10 question test! So I created a new method for
testing, which I dubbed "Grade A 1.5" and implemented it in MacFolklore.
Once MacFolklore seemed like a stable program, I decided to try for a
graphical interface instead of plain text. Some problems immediately became
apparrent. Some ideas popped into my head for making the randomize and
testing algorithms more efficient. So for the graphical version, I came up
with yet another specification, "Grade A 2.0". This proved to be more
stable, faster, and easier to program. This is the spec that is used in
the release version of MacFolklore.
_About the engine itself_
The Grade A 2.0 specification is something any C programmer could whip up
in a day or two. I don't claim this to be any breakthrough technology.
Grade A 2.0 is basically a static array of testing cells, each of which
has a question, answer, and three choices. It's not the most efficient
implementation, but I didn't feel that a project of this size required
dynamic allocation (yet).
The reason I'm writing about the testing engine is because testing is
a common application. I think that Grade A 2.0 is a decent way to
implement testing, and the methods it uses could benefit other
programmers.
The entire code for MacFolklore is contained in one c file, with some
utility functions provided by a library I wrote and file I/O provided
by the ANSI C library. The format is linear in nature, unlike most
Macintosh programs. There's a definite beginning and end. All it does
is display some welcome screens, read in a file, randomize the order
questions will be given in, and test the user.
_How can I use the Grade A 2.0 specification?_
If you're a beginning C programmer and you want to write some sort of
quiz program, feel free to contact me. I'd be glad to share some ideas
and parts of the code with you.
If you're interested in using the Grade A 2.0 testing engine for a
commercial application or something other than in-house development
or shareware, I would be glad to give you the code for a flat fee or
royalty rate. It's simple and heavily commented.
_I want to write a quiz program, but I don't want to use Grade A_
Like I said, this is something that would be simple for most C
programmers. If MacFolklore inspires you to go out and write a
quiz program, I'd be very intersted in looking at it and/or
beta testing for you. Please let me know...
_How can I contact you?_
Scott J. Kleper
134 Caversham Woods
Pittsford, NY 14534
sjked@rit.edu